XML Transformation Language Based on Monadic Second Order Logic
نویسندگان
چکیده
Although monadic second-order logic (MSO) has been a foundation of XML queries, little work has attempted to take MSO formulae themselves as a programming construct. Indeed, MSO formulae are capable of expressing (1) all regular queries, (2) deep matching without explicit recursion, (3) queries in a “don’t-care semantics” for unmentioned nodes, and (4) n-ary queries for locating n-tuples of nodes. While previous frameworks for subtree extraction (path expressions, pattern matches, etc.) each had some of these properties, none has satisfied all of them. In this paper, we have designed and implemented a practical XML transformation language called MTran that fully exploits the expressiveness of MSO. MTran is a language based on “select-andtransform” templates similar in spirit to XSLT. However, we design our templates specially suitable for expressing structure-preserving transformation, eliminating the need for explicit recursive calls to be written. Moreover, we allow templates to be nested so as to make use of an n-ary query that depends on the n− 1 nodes selected by the preceding templates. For the implementation of the MTran language, we have developed, as the core part, an efficient evaluation strategy for n-ary MSO queries. This consists of (a) an exploitation of the existing MONA system for the translation from MSO formulae to tree automata and (b) a linear time query evaluation algorithm for tree automata. For the latter, our algorithm is similar to Flum-Frick-Grohe algorithm for MSO queries locating n-tuples of sets of nodes, except that ours is specialized to queries for tuples of nodes and employs a partially lazy set operations for attaining a simpler implementation with a fewer number of tree traversals. We have made experiments and confirmed that our strategy yields a practical performance.
منابع مشابه
XML TRANSFORMATION LANGUAGE BASED ON MONADIC SECOND ORDER LOGIC by
Although monadic second-order logic (MSO) has been a foundation of XML queries, little work has attempted to take MSO formulae themselves as a programming construct. Indeed, MSO formulae are capable of expressing (1) all regular queries, (2) deep matching without explicit recursion, (3) queries in a “don’t-care semantics” for unmentioned nodes and (4) nary queries for locating n-tuples of nodes...
متن کاملTYPECHECKING K-PEBBLE TREE TRANSDUCERS: PRACTICAL EFFICIENCY k-Pebble Tree Transducerに対する静的型検査の実効率 by
Recently, much attention has been drawn on exact typechecking for non-Turing-complete XML transformation languages, such as XSLT and XML-QL. Milo, Suciu, and Vianu proposed a notion of k-pebble tree transducers, a powerful and general framework that can express most of transformations in such languages, and showed that its exact typechecking is decidable in time hyper-exponential to the number ...
متن کاملGraph equivalences and decompositions definable in Monadic Second-Order Logic. The case of Circle Graphs
Many graph properties and graph transformations can be formalized inMonadic Second-Order logic. This language is the extension of First-Order logic allowing variables denoting sets of elements. In the case of graphs, these elements can be vertices, and in some cases edges. Monadic second-order graph properties can be checked in linear time on the class of graphs of tree-width at most k for any ...
متن کاملProgram Verification with Monadic Second-Order Logic & Languages for Web Service Development
Domain-specific formal languages are an essential part of computer science, combining theory and practice. Such languages are characterized by being tailor-made for specific application domains and thereby providing expressiveness on high abstraction levels and allowing specialized analysis and verification techniques. This dissertation describes two projects, each exploring one particular inst...
متن کاملStructured Document Transformations Based on XSL
Based on the recursion mechanism of the XML transformation language XSL, the document transformation language DTL is defined. First the instantiation DTL is considered that uses regular expressions as pattern language. This instantiation closely resembles the navigation mechanism of XSL. For DTL the complexity of relevant decision problems such as termination of programs, usefulness of rules an...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007